/**
 * 
 */
package com.archives.blog.common.utils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.io.FileUtils;

/**
 * @author chh
 *
 */
public class FileUploadUtil {
	
	private FileUploadUtil(){}
	
	public static void write(InputStream is, String savePath){
		File file = new File(savePath);
		try {
			FileUtils.copyInputStreamToFile(is, file);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
